﻿using System;
using System.Collections.Generic;
using System.Text;

namespace RLFtrClc
{
    public class CalculatedFighterGroup: ICalculatedFighter
    {
        public int RowOneArmor = 6;
        public int RowTwoArmor = 8;
        public int RowThreeArmor = 10;
        public int RowFourArmor = 13;
        public int RowFiveArmor = 16;
        public int RowSixArmor = 19;

        public int RowOneCRA = 0;
        public int RowTwoCRA = 0;
        public int RowThreeCRA = 0;
        public int RowFourCRA = 0;
        public int RowFiveCRA = 0;
        public int RowSixCRA = 0;

        public int RowOneLRA = 0;
        public int RowTwoLRA = 0;
        public int RowThreeLRA = 0;
        public int RowFourLRA = 0;
        public int RowFiveLRA = 0;
        public int RowSixLRA = 0;

        public int Missiles = 0;
        public int Movement = 0;

        public string Name = String.Empty;

        public CalculatedFighterGroup()
        {
        }

        #region ICalculatedFighter Members

        void ICalculatedFighter.setArmorRow(int Row, int Armor)
        {
            switch (Row)
            {
                case 1:
                    RowOneArmor = Armor;
                    break;
                case 2:
                    RowTwoArmor = Armor;
                    break;
                case 3:
                    RowThreeArmor = Armor;
                    break;
                case 4:
                    RowFourArmor = Armor;
                    break;
                case 5:
                    RowFiveArmor = Armor;
                    break;
                case 6:
                    RowSixArmor = Armor;
                    break;
            }

        }

        void ICalculatedFighter.setCRARow(int Row, int CRA)
        {
            switch (Row)
            {
                case 1:
                    RowOneCRA = CRA;
                    break;
                case 2:
                    RowTwoCRA = CRA;
                    break;
                case 3:
                    RowThreeCRA = CRA;
                    break;
                case 4:
                    RowFourCRA = CRA;
                    break;
                case 5:
                    RowFiveCRA = CRA;
                    break;
                case 6:
                    RowSixCRA = CRA;
                    break;
            }
        }

        void ICalculatedFighter.setLRARow(int Row, int LRA)
        {
            switch (Row)
            {
                case 1:
                    RowOneLRA = LRA;
                    break;
                case 2:
                    RowTwoLRA = LRA;
                    break;
                case 3:
                    RowThreeLRA = LRA;
                    break;
                case 4:
                    RowFourLRA = LRA;
                    break;
                case 5:
                    RowFiveLRA = LRA;
                    break;
                case 6:
                    RowSixLRA = LRA;
                    break;
            }
        }

        void ICalculatedFighter.setMovement(int Movement)
        {
            this.Movement = Movement;
        }

        void ICalculatedFighter.setMissiles(int Missiles)
        {
            this.Missiles = Missiles;
        }

        void ICalculatedFighter.setName(string Name)
        {
            this.Name = Name;
        }

        int ICalculatedFighter.getArmorRow(int Row)
        {
            int retVal = 0;
            switch (Row)
            {
                case 1:
                    retVal = RowOneArmor;
                    break;
                case 2:
                    retVal = RowTwoArmor;
                    break;
                case 3:
                    retVal = RowThreeArmor;
                    break;
                case 4:
                    retVal = RowFourArmor;
                    break;
                case 5:
                    retVal = RowFiveArmor;
                    break;
                case 6:
                    retVal = RowSixArmor;
                    break;
            }
            return retVal;
        }

        int ICalculatedFighter.getCRARow(int Row)
        {
            int retVal = 0;
            switch (Row)
            {
                case 1:
                    retVal = RowOneCRA;
                    break;
                case 2:
                    retVal = RowTwoCRA;
                    break;
                case 3:
                    retVal = RowThreeCRA;
                    break;
                case 4:
                    retVal = RowFourCRA;
                    break;
                case 5:
                    retVal = RowFiveCRA;
                    break;
                case 6:
                    retVal = RowSixCRA;
                    break;
            }
            return retVal;
        }

        int ICalculatedFighter.getLRARow(int Row)
        {
            int retVal = 0;
            switch (Row)
            {
                case 1:
                    retVal = RowOneLRA;
                    break;
                case 2:
                    retVal = RowTwoLRA;
                    break;
                case 3:
                    retVal = RowThreeLRA;
                    break;
                case 4:
                    retVal = RowFourLRA;
                    break;
                case 5:
                    retVal = RowFiveLRA;
                    break;
                case 6:
                    retVal = RowSixLRA;
                    break;
            }
            return retVal;
        }

        int ICalculatedFighter.getMovement()
        {
            return Movement;
        }

        int ICalculatedFighter.getMissiles()
        {
            return Missiles;
        }

        string ICalculatedFighter.getName()
        {
            return Name;
        }

        #endregion
    }
}
